using UnityEngine;
using UnityEngine.UI;
using TEngine;

namespace GameLogic
{
    [Window(UILayer.UI)]
    class LocalizationWindow : UIWindow
    {
        #region 脚本工具生成的代码
        private Button m_btnChinsese;
        private Button m_btn1English;
        protected override void ScriptGenerator()
        {
            m_btnChinsese = FindChildComponent<Button>("m_btnChinsese");
            m_btn1English = FindChildComponent<Button>("m_btn1English");
            m_btnChinsese.onClick.AddListener(OnClickChinseseBtn);
            m_btn1English.onClick.AddListener(OnClick1EnglishBtn);
        }
        #endregion

        #region 事件
        private void OnClickChinseseBtn()
        {
            GameModule.Localization.Language = Language.ChineseSimplified;
        }
        private void OnClick1EnglishBtn()
        {
            GameModule.Localization.Language = Language.English;
        }
        #endregion

    }
}
